using System;
using System.Collections.Generic;
using System.Text;
using Decav.Geography;

namespace Decav.Geocoding
{
    /// <summary>
    /// The geographical information for an intersection of two streets.
    /// </summary>
    public class GeocodeIntersectionResult : GeocodeResult
    {
        public GeocodeIntersectionResult(LatLongPoint postition, StreetAddress street1, StreetAddress street2,
            string city, string state, string postalCode)
            : base(postition, city, state, postalCode)
        {
            _street1 = street1;
            _street2 = street2;
        }

        private StreetAddress _street1;
        private StreetAddress _street2;

        /// <summary>
        /// Gets the street that is intersecting with <see cref="Street2"/>.
        /// </summary>
        public StreetAddress Street1
        {
            get
            {
                return _street1;
            }
        }

        /// <summary>
        /// Gets the street that is intersecting with <see cref="Street1"/>.
        /// </summary>
        public StreetAddress Street2
        {
            get
            {
                return _street2;
            }
        }

        public override string ToString()
        {
            return string.Format("{0} and {1}\r\n{2}", Street1, Street2, SecondLineToString());
        }
    }
}
